<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/common.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <link href="${pageContext.request.contextPath}/resource/css/def/ztree/metro.css" rel="stylesheet">
  	<link href="${pageContext.request.contextPath}/resource/css/def/bootstrap/ace/ace-part2.min.css" rel="stylesheet">
  	<link href="${pageContext.request.contextPath}/resource/css/def/bootstrap/ace/ace.css" rel="stylesheet">
  	<link href="${pageContext.request.contextPath}/resource/css/def/frm/common/common.css" rel="stylesheet">
  	<script src="${pageContext.request.contextPath}/resource/js/jquery/plugin/handlebars-v3.0.1.js"></script>
  	<script src="${pageContext.request.contextPath}/resource/js/bootstrap/validator/bootstrapValidator.js"></script>
  	<!-- 新增 -->
  	 <link href="${pageContext.request.contextPath}/resource/css/index.css" rel="stylesheet">
  	 <script src="${prcs}/js/jquery/plugin/My97DatePicker/WdatePicker.js"></script>
     <script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/jquery/plugin/jquery.ztree.all-3.5.min.js"></script>
     <script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/frm/sys/disOrgTree.js"></script>
  </head>
<script type="text/javascript">

function selectInfo(){
	
	$.ajax({
			url:"selectInfo.action",
			data:{
				elec_id:"GHBH20170516145735358"
			},
			dataType:"JSON",
			type:"POST",
			success:function(data){
				$("#elec_id").val(data.elec_id);
				$("#name").val(data.name);
				$("#prov").val(data.prov);
				$("#eparchy_code").val(data.eparchy_code);
				//$("#apply_staff_id").val(data.apply_staff_id);
				$("#org_id").val(data.org_id);
				//$("#sel_staff_id").val(data.sel_staff_id);
				$("#valid_start_date").val(data.valid_start_date);
				$("#valid_end_date").val(data.valid_end_date);
				$("#apply_desc").val(data.apply_desc);
				//$("#num").val(data.num);
				var num = data.num;
				//alert(num);
				$('#num').text(num); 
				$('#apply_staff_id').text(data.apply_staff_id);
				$("#sel_staff_id").text(data.sel_staff_id);
			},
			error:function(e){
				alertModel("查询电子公函失败o_o请查明原因后重试！");
			}
		})
}
//关闭当前页面
function closeAddPage(){
	window.close();
} 
//核验号码信息
function doDetail() {
	var elec_id = $("#elec_id").val();
	var url = prc + "/hyNumController/goDatas?elec_id="+elec_id;
	var iframe = $("#_url").attr("src", url);
	 try{
		            var bHeight = iframe.contentWindow.document.body.scrollHeight;
		            var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
		            var height = Math.max(bHeight, dHeight);
		            iframe.height =  Math.max(height,400);
		         //  alert(height)
		            }catch (ex){}
	$('#numModal').modal({
		'show' : true
	});
}
//跳转到警员信息页面
function toJyXx(obj) {
	var staffId = $("#apply_staff_id").text();
	var url = prc + "/jyxxController/jyxxInfo?staffId="+staffId;
	$("#jump_url").attr("src", url);
	$('#infoModal').modal({
		'show' : true
	});
}

//跳转到办案人员信息页面
function toBanAnXx(obj) {
	var staffId = $("#sel_staff_id").text();
	var url = prc + "/jyxxController/jyxxInfo?staffId="+staffId;
	$("#jump_url").attr("src", url);
	$('#infoModal').modal({
		'show' : true
	});
}
</script>
  <body onload="selectInfo()">
			<div style="height:100%;" class="main-content">
				<div class="page-content" style="background: #fff">
				<form class="form-horizontal" role="form" id="dzghForm" autocomplete="off">
					<div class="head-title"><span>电子公函详情</span></div>
					<div class="check-div">
						<div class="row check-row apply-row">
							<div class="col-sm-12">
								<div class="input-group">
									<span class="input-group-addon">电子公函编号 </span>
									<input type="text" id="elec_id" name="elec_id" class="form-control"
										   disabled="disabled">
								</div>
							</div>
						</div>
						<div class="row check-row apply-row">
							<div class="col-sm-12">
								<div class="input-group">
									<span class="input-group-addon">案件名称 </span>
									<input id="name" type="text" class="form-control" name="name" disabled="disabled">
								</div>
							</div>
						</div>
						<div class="row check-row apply-row">
							<div class="col-sm-6">
								<div class="input-group">
									<span class="input-group-addon">申请省份</span>
									<input id="prov" type="text" class="form-control" value="${bean.prov}" name="prov" 
										   disabled="disabled">
								</div>
							</div>
							<div class="col-sm-6">
								<div class="input-group">
									<span class="input-group-addon">申请地市</span>
									<input id="eparchy_code"  type="text" class="form-control" value="${bean.eparchy_code }" name="eparchy_code" 
										   disabled="disabled">
								</div>
							</div>
						</div>
						<div class="row check-row apply-row">
						<div class="col-sm-6">
								<div class="input-group">
									<span class="input-group-addon">申请单位</span>
									<input  id="org_id" type="text" class="form-control" value="${bean.org_id}" name="org_id" disabled="disabled">
								</div>
						</div>
						<div class="col-sm-6">
								<div class="input-group">
									<span class="input-group-addon">申请时间</span>
									<input  id="org_id" type="text" class="form-control" value="${bean.org_id}" name="org_id" disabled="disabled">
								</div>
						</div>
						</div>
						<div class="row check-row apply-row">
							<div class="col-sm-6">
								<div class="input-group">
									<span class="input-group-addon">申请人员</span>
									<div class="form-control">
										<a id="apply_staff_id" name="apply_staff_id"  onClick="toJyXx()" style="color:blue;text-decoration:underline"></a>
									</div>
								</div>
							</div>
							<div class="col-sm-6">
								<div class="input-group">
									<span class="input-group-addon">警员编号</span>
									<input type="text" class="form-control" value="${bean.jybh }" name="jybh" disabled="disabled">
								</div>
							</div>
						</div>
						<div class="row check-row apply-row">
						
							<div class="col-sm-12">
								<div class="input-group">
									<span class="input-group-addon">办案人员</span>
									<div class="form-control">
										<a id="sel_staff_id" name="sel_staff_id"  onClick="toBanAnXx()" style="color:blue;text-decoration:underline"></a>
									</div>
								</div>
							</div>
						</div>
						<div class="row check-row apply-row">
							<div class="col-sm-6">
								<div class="input-group">
									<span class="input-group-addon">检验时效</span>
									<input id="valid_start_date" type="text" class="form-control" name="valid_start_date" id="valid_start_date" disabled="disabled">
								</div>
							</div>
							<div class="col-sm-6">
								<div class="input-group">
									<span class="input-group-addon">至</span>
									<input id="valid_end_date" type="text" class="form-control" name="valid_end_date" id="valid_end_date" disabled="disabled">
								</div>
							</div>
						</div>
						<div class="row apply-row" style="height: 52px;">
							<div class="col-sm-12">
								<div class="input-group">
									<span class="input-group-addon">申请描述</span>
									<textarea id="apply_desc" type="text" class="form-control" name="apply_desc" disabled="disabled"></textarea>
								</div>
							</div>
						</div>
						<div class="row apply-row">
							<div class="col-sm-12">
								<div class="input-group">
									<span class="input-group-addon">核验号码数量</span>
									<div class="form-control">
										<a id="num" name="num"  onClick="doDetail()" style="color:blue;text-decoration:underline"></a>
									</div>
									
								</div>
							</div>
						</div>
					</div>
            </form>
				</div>
			</div>
			
	<!-- 人员信息模态框 开始 -->
	<div class="modal fade" id="infoModal" tabindex="-1" role="dialog" aria-labelledby="infoModal_label">
		<div class="modal-dialog" style="min-width: 800px;">
			<div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
	                    <span aria-hidden="true">&times;</span>
	                </button>
	                <h4 class="modal-title" id="orgModalLabel">警员信息详情</h4>
	            </div>
				<div>
					<iframe id="jump_url" width="100%" height="100%" src="" style="min-height: 360px;"></iframe>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 人员信息模态框 结束 -->
	<!-- 人员信息模态框 开始 -->
	<div class="modal fade" id="numModal" tabindex="-1" role="dialog" aria-labelledby="infoModal_label">
		<div class="modal-dialog" style="min-width: 1000px;">
			<div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
	                    <span aria-hidden="true">&times;</span>
	                </button>
	                <h4 class="modal-title" id="orgModalLabel">核验号码查询</h4>
	            </div>
				<div>
					<iframe id="_url" width="100%" height="100%" src="" ></iframe>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 人员信息模态框 结束 -->
  </body>
</html>
